package com.cnzhy.service.fallback;

import com.cnzhy.entity.CrmAdminUser;
import com.cnzhy.service.UserFeignService;
import org.springframework.stereotype.Component;

/**
 * @Author: zhaoyan5
 * 服务降级类
 */
@Component
public class UserServiceFallback implements UserFeignService {

    /**
     * 获取信息
     *
     * @param name
     * @return
     */
    @Override
    public String getMessage(String name) {
        return "服务降级了, 这是降级后返回的信息.";
    }

    /**
     * 获取用户
     *
     * @param userId
     * @return
     */
    @Override
    public CrmAdminUser getCrmAdminUser(long userId) {
        return new CrmAdminUser();
    }
}
